class Player(object):
    # 统计玩家数量
    number = 0  # 类属性
    def __init__(self, name, age):
        self.name = name  # 实例属性
        self.age = age
        Player.number += 1

jack = Player('jack', 18)
print(jack.__dict__)
print(Player.number)
